package com.abocode.aichat.app.user.repository;

import com.abocode.aichat.app.user.model.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by guanxf on 2015/12/16.
 */
public interface UserRepository extends PagingAndSortingRepository<User, Long> {

    Long countByAccount(String account);

    Page<User> findAll(Pageable pageable);

    long countByType(int userTypeIsOfficial);

    User findByAccount(String account);
}
